package com.charlotte.study.gupao.strategy.promotion.v2;

import com.charlotte.study.gupao.strategy.promotion.IPromotionStrategy;

import java.util.Set;

/**
 * @author junjie.ding
 * @date 2020/3/16
 */
public class Test {

    public static void main(String[] args) {
        // 先查出所有的优惠策略
        Set<String> strings = PromorionStrategyFactory.promotionKeys();

        // 选择一个优惠方案
        String promotionKey = "COUPON";

        // 使用优惠方案
        IPromotionStrategy strategy = PromorionStrategyFactory.getPromotionStrategy(promotionKey);
        strategy.doPromotion();
    }
}
